import { defineStore } from 'pinia'
import { ref, reactive, unref, computed } from 'vue'
import { useStorage } from '@/hooks/web/useStorage'

const { get, set, clear } = useStorage()

export const useUserSetting = defineStore('userSetting', async () => {
  const settingInfo = ref<UniApp.AuthSetting>()
  
  const { authSetting } = await uni.getSetting()
  settingInfo.value = authSetting
  return {
    settingInfo
  }
})
